<?php
/// In order to use this script freely
/// you must leave the following copyright
/// information in this file:
/// Copyright 2012 www.turningturnip.co.uk
/// All rights reserved.

include("connect.php");

$id = $_POST['id'];

$user_id = trim(mysql_real_escape_string($_POST["user_id"]));
		$login_id = trim(mysql_real_escape_string($_POST["login_id"]));
		$nama = trim(mysql_real_escape_string($_POST["nama"]));
		$alamat = trim(mysql_real_escape_string($_POST["alamat"]));
		$kota = trim(mysql_real_escape_string($_POST["kota"]));
		$negara = trim(mysql_real_escape_string($_POST["negara"]));
		$kode_pos = trim(mysql_real_escape_string($_POST["kode_pos"]));
		$no_telp = trim(mysql_real_escape_string($_POST["no_telp"]));
		$no_hp = trim(mysql_real_escape_string($_POST["no_hp"]));
		$email = trim(mysql_real_escape_string($_POST["email"]));
		$password = trim(mysql_real_escape_string($_POST["password"]));
		
$rsUpdate = mysql_query("UPDATE mst_user
	SET  user_id = '$user_id',  login_id = '$login_id',  nama = '$nama',  alamat = '$alamat',  kota = '$kota',  negara = '$negara',  kode_pos = '$kode_pos',  no_telp = '$no_telp',  no_hp = '$no_hp',  email = '$email',  password = '$password'
	WHERE id = '$id' ");

if($rsUpdate) { echo "Successfully updated"; } else { die('Invalid query: '.mysql_error()); }
?>

<a href="index.php">Back to index</a>
